import { _decorator, Label, Node, Sprite } from 'cc';
import { UIComponent } from '../../../../Framework/Scripts/Managers/UIComponent';
const { ccclass, property } = _decorator;

////主题赛
@ccclass('GameRankItem1')
export class GameRankItem1 extends UIComponent {
    labRank: Label;
    spRank: Sprite;
    sphead: Sprite;
    lbaName: Label;
    labType: Label; //段位类型
    labLv: Label;   //段位等级
    labNum: Label; //勋章数
    protected onLoad(): void {
        this.InitUI();
    }

    start() {
        this.InitData();
    }

    protected onDestroy(): void {
        this.unRegisterEvent();
    }

    private InitUI(){
        this.registerEvent();

        this.labRank = this.ViewComponent('labRank',Label);
        this.spRank = this.ViewComponent('spRank',Sprite);
        this.setHeadMat(this.sphead,1);
        this.sphead = this.ViewComponent('head/spHead',Sprite);
        this.lbaName = this.ViewComponent('labName',Label);
        this.labType = this.ViewComponent('labType',Label);
        this.labLv = this.ViewComponent('labLv',Label);
        this.labNum = this.ViewComponent('labNum',Label);
    }

    private InitData(){
   
    }

    private registerEvent(){
        // globalThis.gameMgr._eventTarget.on(EventMsgKes.loading,this.onLoadingPro,this);
    }

    private unRegisterEvent(){
        // globalThis.gameMgr._eventTarget.off(EventMsgKes.loading,this.onLoadingPro,this);
    }
}